package com.wudizaba.jasper.controller;


import com.wudizaba.jasper.po.AResult;
import com.wudizaba.jasper.service.IDishService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 菜品 前端控制器
 * </p>
 *
 * @author wudizaba
 * @since 2024-05-18
 */
@RestController
@RequestMapping("/dish")
@Api(tags = "jasper导出")
@RequiredArgsConstructor
public class DishController {
    private final IDishService dishService;

    @ApiOperation(value = "导出文件")
    @PostMapping( value = "/list" ,produces = "application/json")
    public AResult getlist(@RequestParam String fileName, @ApiParam(value = "1=pdf,2=html,3=xml,4=docx,5=xlsx,6=png") @RequestParam Integer en) {
        return dishService.getlistPdf(fileName, en);
    }


}
